﻿/**
 * 
 * @file OperMaterialFluid.h
 * @brief 流体材料操作器
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-12-05
 * 
 */
#ifndef _OPER_MATERIAL_FLUID_H___
#define _OPER_MATERIAL_FLUID_H___

#include "OperatorsInterface/OperAbstractMaterial.h"

namespace ModelOper
{
    /**
     * @brief 流体材料操作器
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-12-05
     */
    class OperMaterialFluid : public EventOper::OperAbstractMaterial
    {
    public:
        /**
         * @brief Construct a new Oper Material Fluid object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        explicit OperMaterialFluid() = default;
        /**
         * @brief Destroy the Oper Material Fluid object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual ~OperMaterialFluid() = default;
        /**
         * @brief 执行UI操作
         * @return true 
         * @return false 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        bool execGUI() override;
        /**
         * @brief 执行业务操作
         * @return true 
         * @return false 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */ 
        bool execProfession() override;
     
         /**
         * @brief 创建材料
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */            
        virtual void createMaterial() override;
        /**
         * @brief 复制材料
         * @param[i]  matid          材料id
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */ 
        virtual void duplicateMaterial(const int matID) override;
          /**
         * @brief 编辑材料
         * @param[i]  matid          材料id
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void editMaterial(const int matID) override;
        /**
         * @brief 删除材料
         * @param[i]  matid          材料id
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void removeMaterial(const int matid) override;
        /** 
          * @brief 设置属性
          * @param[i]  name           属性名
          * @param[i]  currentText    当前值
          * @param[i]  attrIndex      属性索引
          * @param[i]  matIDs         材料id
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-12-05
          */
        virtual void setAttribute(const QString &name, const QString& currentText ,const int attrIndex, const QList<int> & matIDs) override;

    };
    //注册对象
    Register2FITKOperatorRepo(OperMaterialFluid, OperMaterialFluid);
    Register2FITKOperatorRepo(actionFluid, OperMaterialFluid);

}

#endif